const name = 'bob'

class A{
  name = 'louis'
  getName(){
    console.log(this.name)
    setTimeout(function(){
      console.log(this.name)
    },500)
  }
}

var a = new A()
a.getName()